import { http } from "@/utils/http";
import { baseUrlApi } from "../utils";

/** 获取基础档案-区域管理列表 */
export const getAreaPage = (params?: object) => {
  return http.request<any>("get", baseUrlApi("/area/page"), { params });
};

/** 基础档案--区域管理列表-新增区域管理 */
export const areaAdd = (data?: object) => {
  return http.request<any>("post", baseUrlApi("/area/add"), { data });
};

/** 基础档案-区域管理列表-编辑区域 */
export const areaUpdate = (data?: object) => {
  return http.request<any>("post", baseUrlApi("/area/update"), { data });
};

/** 基础档案-区域管理列表-删除区域 */
export const areaDelete = (id?: object) => {
  return http.request<any>("post", baseUrlApi(`/area/delete?id=${id}`));
};
